<?php 
include '../functions.php';

$dsn="mysql:host=127.0.0.1;dbname=zuoye";

$pdo = new Pdo($dsn,"root","");
//设置字符集
$pdo->query("set names utf8");

$pdo->setAttribute(PDO::ATTR_ERRMODE,PDO::ERRMODE_SILENT);

$result = $pdo->query("select * from studen");

$rows = $result->fetchAll(PDO::FETCH_ASSOC);

p($rows);



